function PlotResult